Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store images in a separate table and fetch them on demand #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Artur-
Copy link
Member

@Artur- Artur- commented Oct 6, 2022

This fixes vaadin/starters#85

It also makes image handling smarter as the images are not loaded as part of an entity, which you rarely want

This fixes vaadin/starters#85

It also makes image handling smarter as the images are not loaded as part of an entity, which you rarely want
Copy link

@petrixh petrixh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general as the target is/was to separate the images from the actual entity to improve Master view loading times (that don't show the images). The changes seem good.

A couple of small notes to maybe think about but nothing that should block merging.

Images are stored as binary in the DB, but presented in the UI as Base64 encoded. Is this intentional? Why not store them as b64?

  • UserService#getProfilePictureUrl (is it actually an URL?)
    - If the name is for demonstration purposes, maybe a comment indicating that this is where one could add their own logic to load the image from a source, File, Gravatar etc.. We use b64 here for simplicity...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exception with LOB in User entity
2 participants